/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modeles;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author elo
 */
@Entity
public class jeu implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    private int numero;
    private String nom;
    private String editeur;
    private String description;
    private float prix;
    private Collection<String> listeImg;
    //relation a mettre mais je sais pas
    private Collection<age> ageJeux;
    //relation a mettre mais je sais pas
    private Collection<categorie> listeCat;
    //relation a mettre mais je sais pas 
    private Collection<tag> listeTag;
    private float note;
    private int nbvote;
    private String video;
    private int consultation;

    public jeu() {
    }

    public jeu(final int numero, final String nom, final String editeur, final String description, final float prix, final Collection<String> listeImg, final Collection<age> ageJeux, final Collection<categorie> listeCat, final Collection<tag> listeTag, final float note, final String video, final int consultation, final int nbvote) {
        this.nom = nom;
        this.editeur = editeur;
        this.description = description;
        this.prix = prix;
        this.listeImg = listeImg;
        this.ageJeux = ageJeux;
        this.listeCat = listeCat;
        this.listeTag = listeTag;
        this.note = note;
        this.video = video;
        this.consultation = consultation;
        this.numero = numero;
        this.nbvote = nbvote;
    }

    @Id
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Collection<age> getAgeJeux() {
        return ageJeux;
    }

    public void setAgeJeux(Collection<age> ageJeux) {
        this.ageJeux = ageJeux;
    }

    @Column(length=500)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEditeur() {
        return editeur;
    }

    public void setEditeur(String editeur) {
        this.editeur = editeur;
    }

    public Collection<categorie> getListeCat() {
        return listeCat;
    }

    public void setListeCat(Collection<categorie> listeCat) {
        this.listeCat = listeCat;
    }

    public Collection<String> getListeImg() {
        return listeImg;
    }

    public void setListeImg(Collection<String> listeImg) {
        this.listeImg = listeImg;
    }

    public Collection<tag> getListeTag() {
        return listeTag;
    }

    public void setListeTag(Collection<tag> listeTag) {
        this.listeTag = listeTag;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public float getPrix() {
        return prix;
    }

    public void setPrix(float prix) {
        this.prix = prix;
    }

    public float getNote() {
        return note;
    }

    public void setNote(float note) {
        this.note = note;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public int getConsultation() {
        return consultation;
    }

    public void setConsultation(int consultation) {
        this.consultation = consultation;
    }

    public int getNumero() {
        return numero;
    }

    public void setNumero(int numero) {
        this.numero = numero;
    }

    public int getNbvote() {
        return nbvote;
    }

    public void setNbvote(int nbvote) {
        this.nbvote = nbvote;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof jeu)) {
            return false;
        }
        jeu other = (jeu) object;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modeles.jeu[id=" + id + "]";
    }

}
